<!-- html -->
<template>
  <h2 class="h2">直接返回渲染函数</h2>
  <span class="span2">num1：</span>
  <input class="input1" type="number" v-model="num1">
  <span class="span2">num2：</span>
  <input class="input1" type="number" v-model="num2">
  <button class="button1" @click="changeNum1">修改num1</button>
  <button class="button1" @click="showSum">查看和</button>
</template>

<!-- js或ts -->
<script lang="ts">
export default {
  name: 'setupTest2',
  setup() {
    return () => '我是渲染函数'
  }
}
</script>

<!-- 样式 -->
<style scoped></style>